﻿<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, shrink-to-fit=no"/>
	<title>my97</title>
	<!-- <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script> -->
	<style type="text/css">
		#mysubway{
			width:500px;
			height:600px;
		}
		.blue{
			background:#00f;
		}
	</style>
</head>
<body>
	<div id="mysubway"></div> 
	
	<script type="text/javascript" src="http://webapi.amap.com/subway?v=1.0&amp;key=9ac2a2f1c883fc4b064053e355fa35fb&amp;callback=cbk"></script>
	<script type="text/javascript">
		window.cbk = function(){
			var mysubway = subway("mysubway", { 
				easy: 1 ,
				doubleclick:{
					switch: true
				}
			}); 
			mysubway.event.on('station.touch',function(){	 	
				//点击站点后的事件逻辑请写在这里
			});
			mysubway.event.on('subway.complete',function(){	 
				mysubway.addMarker("上地", {}); //对象必须传 放在加载完成后
				var mymarker2 = mysubway.addMarker("中关村", {
					width: 19,
					height: 33,
					offset: {
						x: 0,
						y: 0
					},
					cnt: "<div><img src='http://webapi.amap.com/theme/v1.3/markers/n/mark_bs.png'></div>"
				});
				mysubway.addInfoWindow("南锣鼓巷");		
				mysubway.setStart("西二旗");
				mysubway.setEnd("龙泽");
			});
			
		};
	</script>
</body>
</html>